package Factory;
/**
 * 静态工厂类型
 * @author MacBook
 *
 */
public class StaticFactory {
	//根据请求去创建对象
	public static Music getMusic(String name){
		if(name.equals("pop"))
			return new PopMusic();
		else if(name.equals("classic"))
			return new ClassicMusic();
		else {
			return null;
		}
	}
}
